//用于显示班级详细信息的表单
var classesDetailForm=Ext.create('Ext.form.Panel',{
	bodyPadding: 10,
    defaults: {
    	border:false,
    	width:'100%',
        anchor: '100%',
        layout: 'column', // 默认定义组件内部元素为布局为列布局方式
    },
    items: [{
        defaults: {
        	border:false,
            layout: 'form',
        },
        items: [{
            columnWidth: 1, // 该列占用的宽度，标识为50％
            items: [{
                xtype: 'textfield',
                border:false,
                labelWidth: 50,
                allowBlank: false,
                fieldLabel: '名称',
                readOnly:true,
                emptyText: '限制字数',
                itemId: 'name'
            }]
        }]
    }, {
        defaults: {
            layout: 'form',
            border:false,
            margin:'20 0 0 0'
        },
        items: [{
            columnWidth: .5, // 该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                border:false,
                labelWidth: 50,
                fieldLabel: '创建人',
                itemId: 'creater'
            }]
        }, {
            columnWidth: .2,
            items: [{
                xtype: 'displayfield',
                border:false,
                labelWidth: 50,
                fieldLabel: '负责人',
                itemId: 'leader'
            }]
        },{
            columnWidth: .2,
            items: [{
            	border:false,
                xtype: 'button',
                text:'选择',
                itemId: 'chooseLeaderButton',
                listeners:[{
                	click:function(){
                		classesChooseLeaderClick();
                	}
                }]
            }]
        }]
    }, {
        defaults: {
            layout: 'form',
            border:false,
            margin:'20 0 0 0'
        },
        items: [{
            columnWidth: .5, // 该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                border:false,
                fieldLabel: '期数:',
                labelWidth: 70,
                itemId: 'stage'
            }]
        }, {
            columnWidth: .5,
            items: [{
                xtype: 'displayfield',
                border:false,
                fieldLabel: '创建时间:',
                labelWidth: 70,
                itemId: 'createDate'
            }]
        }]
    }, {
    	fieldLabel: '描述信息',
    	margin:'20 0 0 5',
    	allowBlank: false,
    	labelWidth: 70,
    	readOnly:true,
        xtype: 'textareafield',
        height:'60%',
        itemId: 'describe',
        cls: 'x-form-valid',
        emptyText: '填写描述信息'
    }]
});

//显示组详细信息的form表单
var groupDetailForm=Ext.create('Ext.form.Panel',{
	bodyPadding: 10,
    height:'100%',
    defaults:{
    	width:'100%',
    	margin:'20 0 0 5',
    },
    items: [{
        xtype: 'textfield',
        margin:'0 0 0 5',
        labelWidth: 50,
        allowBlank: false,
        fieldLabel: '名称',
        emptyText: '限制字数',
        itemId: 'name'
    },{
        xtype: 'displayfield',
        fieldLabel: '创建时间:',
        labelWidth: 70,
        itemId: 'createDate',
    },{
    	fieldLabel: '描述信息',
    	allowBlank: false,
    	labelWidth: 70,
        xtype: 'textareafield',
        height:'70%',
        itemId: 'describe',
        cls: 'x-form-valid',
        emptyText: '填写描述信息'
    }]
});

//显示项目详细信息的表单
var classesProjectDetailForm=Ext.create('testProjectFormBase',0);

//用于显示复制测试需求的详细信息表单
var classesCopyReqDetailForm=Ext.create("Ext.form.Panel", {
	header:false,
	border:false,
    bodyPadding: 10,
    defaults: {
    	width:'100%',
    	layout: 'column', //默认定义组件内部元素为布局为列布局方式
        anchor: '100%',
        border: false,
        margin:'20 0 0 0'
    },
    items: [{
    	margin:'0 0 0 0',
        defaults: {
            border: false,
            layout: 'form'
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'textfield',
                labelWidth: 50,
                readOnly:true,
                fieldLabel: '标题',
                name: 'title',
                itemId: 'testRequirementFormTitle'
            }]
        },{
            columnWidth: .2,
            items: [{
                xtype: 'button',
                text: '查看测试系统信息',
                itemId: 'testRequirementFormSystemDetailButton',
                listeners: [{
                    click: function (btn, e, eOpts) {
                    	testSystemCleanForm(0);
                    	var data=testSystemGetDetail(btn.projectId,0);
                    	testSystemPutDataIntoForm(data,0);
                    	testReqCopySystemWin.show();
                    }
                }]
            }]
        }]
    }, {
        defaults: {
            border: false,
            layout: 'form'
        },
        items: [{
            columnWidth: 1, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                labelWidth: 50,
                fieldLabel: '编写者',
                itemId: 'testRequirementFormAuthor'
            }]
        } ]
    }, {
        defaults: {
            border: false,
            layout: 'form'
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                fieldLabel: '创建时间:',
                //formatText:'date("Y-m-d H:i:s")',
                labelWidth: 70,
                itemId: 'testRequirementFormCreateDate'
            }]
        }, {
            columnWidth: .5,
            items: [{
                xtype: 'displayfield',
                fieldLabel: '最近更新:',
                //formatText:'date("Y-m-d H:i:s")',
                labelWidth: 70,
                itemId: 'testRequirementFormUpdateDate'
            }]
        }]
    }, 
    {
    	layout:'fit',
    	height:350,
    	scrollable:true,
    	frame: true,//里面如果用htmlEditor的话不知道为什么会报错
    	items:[{
        	xtype: 'displayfield',
        	itemId:'detail',
        }]
    }
//    {
//    	fieldLabel: '内容:',
//    	xtype: 'displayfield'
//    },{
//    	xtype: 'displayfield',
//    	readOnly:true,
//    	itemId:'detail',
//    	border:true,
//        height: 350,
//    }
    ]
});

//用于显示复制测试计划详细信息的表单
var testDesignCopyDetailForm = Ext.create("Ext.form.Panel", {
    header:false,
    bodyPadding: 10,
    border:false,
    overflowX: 'hidden', //设置横向滚动条不显示
    overflowY: 'auto', //设置纵向滚动条超出高度显示
    defaults: {
        anchor: '100%',
        layout: 'column', //默认定义组件内部元素为布局为列布局方式
        border: false
    },
    items: [{
        defaults: {
            border: false,
            layout: 'form',
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'textfield',
                labelWidth: 50,
                readOnly:true,
                allowBlank: false,
                fieldLabel: '标题',
                name: 'title',
                emptyText: '限制字数',
                itemId: 'testDesignDetailFormTitle'
            }]
        }]
    }, {
        defaults: {
            border: false,
            layout: 'form',
            margin:'20 0 0 0'
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                labelWidth: 50,
                fieldLabel: '编写者',
                itemId: 'testDesignDetailFormAuthor'
            }]
        }, {
            columnWidth: .5,
            items: [{
                xtype: 'combo',
                fieldLabel: '优先级',
                allowBlank: false,
                readOnly:true,
                labelWidth: 50,
                editable: false,//防止用户直接在下拉框里输入
                itemId: 'testDesignDetailFormPriority',
                emptyText: '主题文件夹无优先级',
                store: priorityStore,
                queryMode: 'local',
                displayField: 'priorityName',
                valueField: 'priorityNum',
            }]
        }]
    }, {
        defaults: {
            border: false,
            layout: 'form',
            margin:'20 0 0 0'
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                fieldLabel: '创建时间:',
                labelWidth: 70,
                itemId: 'testDesignDetailFormCreateDate'
            }]
        }, {
            columnWidth: .5,
            items: [{
                xtype: 'displayfield',
                fieldLabel: '最近更新:',
                labelWidth: 70,
                itemId: 'testDesignDetailFormUpdateDate'
            }]
        }]
    }, {
    	fieldLabel: '描述信息',
    	margin:'20 0 0 5',
    	allowBlank: false,
    	labelWidth: 70,
    	readOnly:true,
        xtype: 'textareafield',
        height:'65%',
        id: 'testDesignDetailFormDescription',
        cls: 'x-form-valid',
        emptyText: '填写描述信息'
    }]
});

//用于查看复制测试执行详细信息的表单
var testRunCopyDetailForm = Ext.create("Ext.form.Panel", {
    header:false,
    bodyPadding: 10,
    border:false,
    defaults: {
        anchor: '100%',
        layout: 'column', //默认定义组件内部元素为布局为列布局方式
        border: false
    },
    items: [{
        defaults: {
            border: false,
            layout: 'form',
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'textfield',
                labelWidth: 50,
                allowBlank: false,
                fieldLabel: '标题',
                name: 'title',
                itemId: 'testRunDetailFormTitle',
                readOnly:true
            }]
        }]
    }, {
        defaults: {
            border: false,
            layout: 'form',
            margin:'20 0 0 0'
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                labelWidth: 50,
                fieldLabel: '编写者',
                itemId: 'testRunDetailFormAuthor'
            }]
        }, {
            columnWidth: .5,
            items: [{
                xtype: 'combo',
                fieldLabel: '优先级',
                allowBlank: false,
                labelWidth: 50,
                editable: false,//防止用户直接在下拉框里输入
                itemId: 'testRunDetailFormPriority',
                emptyText: '测试集文件夹无优先级',
                store: priorityStore,
                queryMode: 'local',
                displayField: 'priorityName',
                valueField: 'priorityNum',
                readOnly:true
            }]
        }]
    }, {
        defaults: {
            border: false,
            layout: 'form',
            margin:'20 0 0 0'
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                fieldLabel: '创建时间:',
                labelWidth: 70,
                itemId: 'testRunDetailFormCreateDate'
            }]
        }, {
            columnWidth: .5,
            items: [{
                xtype: 'displayfield',
                fieldLabel: '最近更新:',
                labelWidth: 70,
                itemId: 'testRunDetailFormUpdateDate'
            }]
        }]
    }, {
        	xtype: 'displayfield',
            fieldLabel: '执行计划:',
            margin:'20 0 0 5',
            labelWidth: 70,
            itemId: 'testRunDetailFormTestDesign'
    },{
    	fieldLabel: '描述信息',
    	margin:'20 0 0 5',
    	allowBlank: false,
    	labelWidth: 70,
        xtype: 'textareafield',
        height:'55%',
        itemId: 'testRunDetailFormDescription',
        cls: 'x-form-valid',
        readOnly:true
    }]
});